﻿@using OF.Utility
@{
    Layout=String.Empty;
    var style = "display:"+(EConvert.ToBoolean(ViewBag.ShowError) ? "block" : "none");
}

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>登录</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport" />
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="@Url.Content("~/lib/bootstrap/css/bootstrap.min.css")">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="@Url.Content("~/lib/font-awesome/css/font-awesome.min.css")">
    <!-- Theme style -->
    <link rel="stylesheet" href="@Url.Content("~/css/AdminLTE.min.css")">
    <!-- AdminLTE Skins. -->
    <link rel="stylesheet" href="@Url.Content("~/css/skins/skin-blue.css")">
    <!-- Date Picker -->
    <link rel="stylesheet" href="@Url.Content("~/lib/bootstrap-datepicker/css/bootstrap-datepicker.min.css")">
    <link rel="stylesheet" href="@Url.Content("~/css/common.css?tn=12231112212312311")">
    <link rel="stylesheet" href="@Url.Content("~/style/css/login.css?tn="+DateTime.Now.ToString("yyyyMMddHHmmssss"))">
 
</head>
<body class="hold-transition login-page">
    <div class="login-box">

        <!-- /.login-logo -->
        <div class="login-box-body">
            <!-- /.login-logo -->
            <div class="login-logo">
                <a href="javascript:;">
                    <div class="img-box">
                        <img src="@Url.Content("~/images/logo.png")" alt="斑马车务" />
                    </div>
                </a>
            </div>
            <div class="error-box">
                <div id="errMsgBox" style="@style" class="error-box-inner">
                    <span class="glyphicon glyphicon-remove icon"></span>
                    <p id="errMsg" class="text">@ViewBag.ErrMsg</p>
                </div>
            </div>
            <form action="@Url.Action("Login")" method="POST">
                <div class="form-group has-feedback">
                    <input id="UserName" name="UserName" type="text"  class="form-control" placeholder="请输入用户名" autocomplete="off"/>
                    <span class="glyphicon glyphicon-user form-control-feedback"></span>
                </div>
                <div class="form-group has-feedback">
                    <input  id="Password" name="Password" type="password" class="form-control" placeholder="请输入密码" autocomplete="off"/>
                    <span class="glyphicon glyphicon-lock form-control-feedback"></span>
                </div>

                <div class="row">
                    <!-- /.col -->
                    <div class="col-xs-12">
                        @*<asp:Button ID="Button1" CssClass="btn btn-primary btn-block btn-flat" runat="server" OnClientClick="return validSubmit();" Text="登录" OnClick="Button1_Click" />*@
                        <input type="submit" name="Button1" value="登录" onclick="return validSubmit();" id="Button1" class="btn btn-primary btn-block btn-flat">
                    </div>
                    <!-- /.col -->
                </div>
            </form>
        </div>
        <!-- /.login-box-body -->
    </div>


    <!-- jQuery 3 -->
    <script src="@Url.Content("~/lib/jquery/jquery.min.js")"></script>
    <!-- Bootstrap 3.3.7 -->
    <script src="@Url.Content("~/lib/bootstrap/js/bootstrap.min.js")"></script>
    <!-- AdminLTE App -->
    <script src="@Url.Content("~/js/adminlte.min.js")"></script>
    <script src="@Url.Content("~/js/bmcw.js")"></script>
    <script>
        function validSubmit() {
            var self = this;
            var userName = $("#UserName").val();
            if (BMCW.isNullOrEmpty(userName)) {
                $("#errMsg").html('请输入用户名');
                $("#errMsgBox").show();
                return false;
            }

            var pwd = $("#Password").val();
            if (BMCW.isNullOrEmpty(pwd)) {
                $("#errMsg").html('请输入密码');
                $("#errMsgBox").show();
                return false;
            }
            return true;
        }
    </script>
</body>
</html>

